$(document).ready(function () {
    $("#submit").on("click",function (e) {
        e.preventDefault();
        submitInfo();
    });
    var id = UrlParm.parm("id");
    getInfo(id);
})
function getInfo(id) {
    $.ajax({
        "url":"../userlogin.do",
        "type":"POST",
        "data":{"method":"review"},
         "dataType":"json",
        "success":function (result) {
        $("form").append($("<input type='hidden' name='id' value='"+id+"'>"));
        $("#name").attr("value",""+result.name+"");
        $("#email").attr("value",""+result.email+"");
        $("#phone").attr("value",""+result.phone+"");
    }
})
}

function  submitInfo() {
    $.ajax({
        "url":"../userlogin.do",
        "type":"POST",
        "data":$("form").serialize(),
        "dataType":"text",
        "success":function (result) {
            if(result=='true'){
                alert("修改成功！");
            }else{
                alert("修改失败！");
            }
        }
    })
}